import { get, post } from '@/utils/http'

/**
 * 分页获取api接口列表
 * @param {*} data 
 * @returns 
 */
export const getApiResourcesByPage = data => get('/api/apiResource/getApiResourcesByPage', data)

/**
 * 获取api接口列表
 * @returns 
 */
export const getApiResources = () => get('/api/apiResource/getApiResources')

/**
 * 添加api接口信息
 * @param {*} data 
 * @returns 
 */
export const addApiResource = (data, callback) => post('/api/apiResource/addApiResource', data, null, callback)

/**
 * 编辑api接口信息
 * @param {*} data 
 * @returns 
 */
export const editApiResource = (data, callback) => post('/api/apiResource/editApiResource', data, null, callback)

/**
 * 删除api接口信息
 * @param {*} data 
 * @returns 
 */
export const deleteApiResource = data => post('/api/apiResource/deleteApiResource', null, data)

